#!/bin/bash
##自动测试主脚本
Compatibility(){
	echo '进入兼容性测试'
}
function_test(){
	echo '进入功能性测试'
}
performance(){
	echo '进入性能测试'
}
stability(){
	echo '进入稳定性测试'
}
security(){
	echo '进入安全性测试'
}
t="[1]兼容性测试 [2]功能性测试 [3]性能测试 [4]稳定性测试 [5]安全性测试"
for i in $t;do
	echo $i
done
read sele
expr $sele  "+" 10 >> /dev/null
if [ $? -eq '0' ];then
	case "$to" in
		"1") Compatibility
		;;
		"2") function_test
		;;
		"3") performance
		;;
		"4") stability
		;;
		"5") security
		;;
	esac
else
	echo '选择错误'
	exit 1
fi
















tools(){
echo '请选择测试工具
[1]lmbench3
[2]netpref网络测试
[...]'
	read to
	expr $to  "+" 10 >> /dev/null
	if [ $? -eq '0' ];then
		case "$to" in
			"1") bash my_linux_test_tools/${op}/lmbench3.sh
			;;
			"2") bash my_linux_test_tools/${op}/netperf.sh
			;;
			"3") echo '3'
			;;
			"4") echo '4'
			;;
		esac
	else
		if [[ "$type" == "A" || "$type" == 'a' ]];then
			echo 'use all'
		else
			echo 'select errors'
		fi
	fi
}